<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>AJAX</title>
<link href="CSS/cssAll.css" type="text/css" rel="stylesheet" />
</head>

<body>
<input type="button" value="click" onclick="some()" />
<div id="test" style="margin:0 auto"></div>
</body>
</html>
<script>
var xmlHttp;
window.onload = some();
function createXMLHttpRequest(){
	if(window.ActiveXObject){
		xmlHttp = new ActiveXObject('Microsoft.XMLHTTP');
	}else{
		xmlHttp = new XMLHttpRequest();	
	}
}
function startRequest(url){
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = handleStateChange;
	xmlHttp.open('get',url,true);
	xmlHttp.send(null);	
}
function handleStateChange(){
	alert(xmlHttp.status);
	if(xmlHttp.readyState == 4){
		if(xmlHttp.status == 200){				
			document.getElementById("test").innerHTML = xmlHttp.responseText;
		}
	}
}

function some(){
	startRequest('JoinMe.html');	
}
</script>